package cn.edu.zafu.bigdata.lwg;

class MathOperations {
    public int add(int a, int b) {
        return a + b;
    }

    public double add(double a, double b) {
        return a + b;
    }

    public int add(int a, int b, int c) {
        return a + b + c;
    }
}

// 测试类
public class Test2 {
    public static void main(String[] args) {
        MathOperations math = new MathOperations();

        int sumInt = math.add(5, 3);
        System.out.println("Sum of integers: " + sumInt);

        double sumDouble = math.add(5.5, 3.3);
        System.out.println("Sum of doubles: " + sumDouble);

        int sumThreeInts = math.add(5, 3, 2);
        System.out.println("Sum of three integers: " + sumThreeInts);
    }
}
